﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using FJERP.DAL;
using FJERP.Model;

namespace FJERP.BLL
{
    public class PurchaseOutBLL
    {
        PurchaseOutDAL dal = new PurchaseOutDAL();
        /// <summary>
        /// 采购订单分页显示
        /// </summary>
        /// <param name="Pageindex"></param>
        /// <param name="PageSize"></param>
        /// <returns></returns>
        public List<Purchase> Purchase_Show(int Pageindex, int PageSize, out int count)
        {
            return dal.Purchase_Show(Pageindex, PageSize, out count);
        }
        public int count()
        {
            return dal.count();
        }

        /// <summary>
        /// 添加采购返厂单信息
        /// </summary>
        /// <param name="P"></param>
        /// <param name="xml"></param>
        /// <returns></returns>
        public int Purchase_Add(Purchase P, string xml)
        {
            return dal.Purchase_Add(P, xml);
        }
        /// <summary>
        /// 显示商品信息
        /// </summary>
        /// <param name="Product_Modelspe"></param>
        /// <returns></returns>
        public DataTable Product_Sel(string Product_Modelspe)
        {
            return dal.Product_Sel(Product_Modelspe);
        }
        /// <summary>
        /// 审核成功库存改变
        /// </summary>
        /// <param name="Purchase_Id"></param>
        /// <returns></returns>
        public int Product_Sate(int Purchase_Id)
        {

            return dal.Product_Sate(Purchase_Id);

        }
        /// <summary>
        /// 审核出库
        /// </summary>
        /// <param name="Purchase_Id"></param>
        /// <returns></returns>
        public List<Purchase> Purchase_palauat(int Purchase_Id)
        {
            return dal.Purchase_palauat(Purchase_Id);
        }
        // <summary>
        /// 审核出库
        /// </summary>
        /// <param name="Purchase_Id"></param>
        /// <returns></returns>
        public List<PurchaseMate> Purchase_pal(int Purchase_Id)
        {
            return dal.Purchase_pal(Purchase_Id);
        }
    }
}
